package edu.zut.hys.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.zut.hys.base.entity.RolePermission;
import edu.zut.hys.base.mapper.RolePermissionMapper;
import edu.zut.hys.base.service.RolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author houyingsheng
* @description 针对表【role_permission】的数据库操作Service实现
* @createDate 2023-01-05 23:28:37
*/
@Service
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission>
    implements RolePermissionService{
    @Autowired
    RolePermissionMapper rolePermissionMapper;

    @Override
    public List<RolePermission> getRolePermissionsByPermissionid(Long permissionid){
        return rolePermissionMapper.selectList(new QueryWrapper<RolePermission>().eq("permissionid",permissionid));
    }
}




